Add e2e SBOM and Advisory Upload tests#1005
Open
queria wants to merge 1 commit into
Open
Conversation
Contributor
Reviewer's GuideAdds comprehensive BDD-based end-to-end coverage for SBOM and Advisory upload flows by introducing shared upload step definitions and feature files, and slightly generalizes the FileUpload page object plus upload pages to support reuse without aria labels or explicit navigation helpers. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
FileUpload.build(page)variant that matches on the genericdiv.pf-v6-c-multiple-file-uploadselector will become ambiguous if any page ever contains more than one uploader; consider asserting that only a single match exists or requiring a more specific selector/context to avoid flaky tests. - The step definition
Then The Upload button is visible in the upload areareaches intofileUploader._uploader; exposing a dedicated method onFileUpload(e.g.getUploadButton()orassertUploadButtonVisible()) would keep the page object encapsulated and make future refactors safer. - The new
fromCurrentPagefactories onAdvisoryUploadPageandSBOMUploadPageare async but do not await anything and are thin wrappers aroundnew; consider making them synchronous or inlining them where used to reduce indirection.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `FileUpload.build(page)` variant that matches on the generic `div.pf-v6-c-multiple-file-upload` selector will become ambiguous if any page ever contains more than one uploader; consider asserting that only a single match exists or requiring a more specific selector/context to avoid flaky tests.
- The step definition `Then The Upload button is visible in the upload area` reaches into `fileUploader._uploader`; exposing a dedicated method on `FileUpload` (e.g. `getUploadButton()` or `assertUploadButtonVisible()`) would keep the page object encapsulated and make future refactors safer.
- The new `fromCurrentPage` factories on `AdvisoryUploadPage` and `SBOMUploadPage` are async but do not await anything and are thin wrappers around `new`; consider making them synchronous or inlining them where used to reduce indirection.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Add comprehensive BDD test coverage for SBOM and advisory upload workflows in a shared @uploads directory with a single reusable step file. Covers navigation, page layout, single/multi file upload, invalid file handling, and file removal scenarios. Implements TC-4004 Assisted-by: Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add comprehensive BDD test coverage for SBOM and advisory upload workflows in a shared @uploads directory with a single reusable step file. Covers navigation, page layout, single/multi file upload, invalid file handling, and file removal scenarios.
For FileUpload page object it allows optional invocation without ariaLabel for reusability between SBOM and Advisory pages - as they have only one upload element matching without aria label is sufficient.
Implements TC-4004
Assisted-by: Claude Code
Summary by Sourcery
Add shared BDD step definitions and feature scenarios to provide comprehensive end-to-end coverage of SBOM and advisory upload flows, including navigation, layout, file upload outcomes, and file removal.
New Features:
Enhancements:
Tests: